{"ast":null,"code":"import FilterFilled from \"@ant-design/icons/es/icons/FilterFilled\";\nimport classNames from 'classnames';\nimport isEqual from \"rc-util/es/isEqual\";\nimport * as React from 'react';\nimport { flattenKeys } from '.';\nimport Button from '../../../button';\nimport Checkbox from '../../../checkbox';\nimport { ConfigContext } from '../../../config-provider/context';\nimport Dropdown from '../../../dropdown';\nimport Empty from '../../../empty';\nimport Menu from '../../../menu';\nimport { OverrideProvider } from '../../../menu/OverrideContext';\nimport Radio from '../../../radio';\nimport Tree from '../../../tree';\nimport useSyncState from '../../../_util/hooks/useSyncState';\nimport FilterSearch from './FilterSearch';\nimport FilterDropdownMenuWrapper from './FilterWrapper';\nimport warning from '../../../_util/warning';\nfunction hasSubMenu(filters) {\n  return filters.some(_ref => {\n    let {\n      children\n    } = _ref;\n    return children;\n  });\n}\nfunction searchValueMatched(searchValue, text) {\n  if (typeof text === 'string' || typeof text === 'number') {\n    return text === null || text === void 0 ? void 0 : text.toString().toLowerCase().includes(searchValue.trim().toLowerCase());\n  }\n  return false;\n}\nfunction renderFilterItems(_ref2) {\n  let {\n    filters,\n    prefixCls,\n    filteredKeys,\n    filterMultiple,\n    searchValue,\n    filterSearch\n  } = _ref2;\n  return filters.map((filter, index) => {\n    const key = String(filter.value);\n    if (filter.children) {\n      return {\n        key: key || index,\n        label: filter.text,\n        popupClassName: `${prefixCls}-dropdown-submenu`,\n        children: renderFilterItems({\n          filters: filter.children,\n          prefixCls,\n          filteredKeys,\n          filterMultiple,\n          searchValue,\n          filterSearch\n        })\n      };\n    }\n    const Component = filterMultiple ? Checkbox : Radio;\n    const item = {\n      key: filter.value !== undefined ? key : index,\n      label: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Component, {\n        checked: filteredKeys.includes(key)\n      }), /*#__PURE__*/React.createElement(\"span\", null, filter.text))\n    };\n    if (searchValue.trim()) {\n      if (typeof filterSearch === 'function') {\n        return filterSearch(searchValue, filter) ? item : null;\n      }\n      return searchValueMatched(searchValue, filter.text) ? item : null;\n    }\n    return item;\n  });\n}\nfunction FilterDropdown(props) {\n  var _a, _b;\n  const {\n    tablePrefixCls,\n    prefixCls,\n    column,\n    dropdownPrefixCls,\n    columnKey,\n    filterMultiple,\n    filterMode = 'menu',\n    filterSearch = false,\n    filterState,\n    triggerFilter,\n    locale,\n    children,\n    getPopupContainer\n  } = props;\n  const {\n    filterDropdownOpen,\n    onFilterDropdownOpenChange,\n    filterResetToDefaultFilteredValue,\n    defaultFilteredValue,\n    // Deprecated\n    filterDropdownVisible,\n    onFilterDropdownVisibleChange\n  } = column;\n  const [visible, setVisible] = React.useState(false);\n  const filtered = !!(filterState && (((_a = filterState.filteredKeys) === null || _a === void 0 ? void 0 : _a.length) || filterState.forceFiltered));\n  const triggerVisible = newVisible => {\n    setVisible(newVisible);\n    onFilterDropdownOpenChange === null || onFilterDropdownOpenChange === void 0 ? void 0 : onFilterDropdownOpenChange(newVisible);\n    onFilterDropdownVisibleChange === null || onFilterDropdownVisibleChange === void 0 ? void 0 : onFilterDropdownVisibleChange(newVisible);\n  };\n  if (process.env.NODE_ENV !== 'production') {\n    [['filterDropdownVisible', 'filterDropdownOpen', filterDropdownVisible], ['onFilterDropdownVisibleChange', 'onFilterDropdownOpenChange', onFilterDropdownVisibleChange]].forEach(_ref3 => {\n      let [deprecatedName, newName, prop] = _ref3;\n      process.env.NODE_ENV !== \"production\" ? warning(prop === undefined || prop === null, 'Table', `\\`${deprecatedName}\\` is deprecated. Please use \\`${newName}\\` instead.`) : void 0;\n    });\n  }\n  const mergedVisible = (_b = filterDropdownOpen !== null && filterDropdownOpen !== void 0 ? filterDropdownOpen : filterDropdownVisible) !== null && _b !== void 0 ? _b : visible;\n  // ===================== Select Keys =====================\n  const propFilteredKeys = filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys;\n  const [getFilteredKeysSync, setFilteredKeysSync] = useSyncState(propFilteredKeys || []);\n  const onSelectKeys = _ref4 => {\n    let {\n      selectedKeys\n    } = _ref4;\n    setFilteredKeysSync(selectedKeys);\n  };\n  const onCheck = (keys, _ref5) => {\n    let {\n      node,\n      checked\n    } = _ref5;\n    if (!filterMultiple) {\n      onSelectKeys({\n        selectedKeys: checked && node.key ? [node.key] : []\n      });\n    } else {\n      onSelectKeys({\n        selectedKeys: keys\n      });\n    }\n  };\n  React.useEffect(() => {\n    if (!visible) {\n      return;\n    }\n    onSelectKeys({\n      selectedKeys: propFilteredKeys || []\n    });\n  }, [propFilteredKeys]);\n  // ====================== Open Keys ======================\n  const [openKeys, setOpenKeys] = React.useState([]);\n  const onOpenChange = keys => {\n    setOpenKeys(keys);\n  };\n  // search in tree mode column filter\n  const [searchValue, setSearchValue] = React.useState('');\n  const onSearch = e => {\n    const {\n      value\n    } = e.target;\n    setSearchValue(value);\n  };\n  // clear search value after close filter dropdown\n  React.useEffect(() => {\n    if (!visible) {\n      setSearchValue('');\n    }\n  }, [visible]);\n  // ======================= Submit ========================\n  const internalTriggerFilter = keys => {\n    const mergedKeys = keys && keys.length ? keys : null;\n    if (mergedKeys === null && (!filterState || !filterState.filteredKeys)) {\n      return null;\n    }\n    if (isEqual(mergedKeys, filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys, true)) {\n      return null;\n    }\n    triggerFilter({\n      column,\n      key: columnKey,\n      filteredKeys: mergedKeys\n    });\n  };\n  const onConfirm = () => {\n    triggerVisible(false);\n    internalTriggerFilter(getFilteredKeysSync());\n  };\n  const onReset = function () {\n    let {\n      confirm,\n      closeDropdown\n    } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n      confirm: false,\n      closeDropdown: false\n    };\n    if (confirm) {\n      internalTriggerFilter([]);\n    }\n    if (closeDropdown) {\n      triggerVisible(false);\n    }\n    setSearchValue('');\n    if (filterResetToDefaultFilteredValue) {\n      setFilteredKeysSync((defaultFilteredValue || []).map(key => String(key)));\n    } else {\n      setFilteredKeysSync([]);\n    }\n  };\n  const doFilter = function () {\n    let {\n      closeDropdown\n    } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n      closeDropdown: true\n    };\n    if (closeDropdown) {\n      triggerVisible(false);\n    }\n    internalTriggerFilter(getFilteredKeysSync());\n  };\n  const onVisibleChange = newVisible => {\n    if (newVisible && propFilteredKeys !== undefined) {\n      // Sync filteredKeys on appear in controlled mode (propFilteredKeys !== undefiend)\n      setFilteredKeysSync(propFilteredKeys || []);\n    }\n    triggerVisible(newVisible);\n    // Default will filter when closed\n    if (!newVisible && !column.filterDropdown) {\n      onConfirm();\n    }\n  };\n  // ======================== Style ========================\n  const dropdownMenuClass = classNames({\n    [`${dropdownPrefixCls}-menu-without-submenu`]: !hasSubMenu(column.filters || [])\n  });\n  const onCheckAll = e => {\n    if (e.target.checked) {\n      const allFilterKeys = flattenKeys(column === null || column === void 0 ? void 0 : column.filters).map(key => String(key));\n      setFilteredKeysSync(allFilterKeys);\n    } else {\n      setFilteredKeysSync([]);\n    }\n  };\n  const getTreeData = _ref6 => {\n    let {\n      filters\n    } = _ref6;\n    return (filters || []).map((filter, index) => {\n      const key = String(filter.value);\n      const item = {\n        title: filter.text,\n        key: filter.value !== undefined ? key : index\n      };\n      if (filter.children) {\n        item.children = getTreeData({\n          filters: filter.children\n        });\n      }\n      return item;\n    });\n  };\n  const getFilterData = node => {\n    var _a;\n    return Object.assign(Object.assign({}, node), {\n      text: node.title,\n      value: node.key,\n      children: ((_a = node.children) === null || _a === void 0 ? void 0 : _a.map(item => getFilterData(item))) || []\n    });\n  };\n  let dropdownContent;\n  if (typeof column.filterDropdown === 'function') {\n    dropdownContent = column.filterDropdown({\n      prefixCls: `${dropdownPrefixCls}-custom`,\n      setSelectedKeys: selectedKeys => onSelectKeys({\n        selectedKeys\n      }),\n      selectedKeys: getFilteredKeysSync(),\n      confirm: doFilter,\n      clearFilters: onReset,\n      filters: column.filters,\n      visible: mergedVisible,\n      close: () => {\n        triggerVisible(false);\n      }\n    });\n  } else if (column.filterDropdown) {\n    dropdownContent = column.filterDropdown;\n  } else {\n    const selectedKeys = getFilteredKeysSync() || [];\n    const getFilterComponent = () => {\n      if ((column.filters || []).length === 0) {\n        return /*#__PURE__*/React.createElement(Empty, {\n          image: Empty.PRESENTED_IMAGE_SIMPLE,\n          description: locale.filterEmptyText,\n          imageStyle: {\n            height: 24\n          },\n          style: {\n            margin: 0,\n            padding: '16px 0'\n          }\n        });\n      }\n      if (filterMode === 'tree') {\n        return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FilterSearch, {\n          filterSearch: filterSearch,\n          value: searchValue,\n          onChange: onSearch,\n          tablePrefixCls: tablePrefixCls,\n          locale: locale\n        }), /*#__PURE__*/React.createElement(\"div\", {\n          className: `${tablePrefixCls}-filter-dropdown-tree`\n        }, filterMultiple ? /*#__PURE__*/React.createElement(Checkbox, {\n          checked: selectedKeys.length === flattenKeys(column.filters).length,\n          indeterminate: selectedKeys.length > 0 && selectedKeys.length < flattenKeys(column.filters).length,\n          className: `${tablePrefixCls}-filter-dropdown-checkall`,\n          onChange: onCheckAll\n        }, locale.filterCheckall) : null, /*#__PURE__*/React.createElement(Tree, {\n          checkable: true,\n          selectable: false,\n          blockNode: true,\n          multiple: filterMultiple,\n          checkStrictly: !filterMultiple,\n          className: `${dropdownPrefixCls}-menu`,\n          onCheck: onCheck,\n          checkedKeys: selectedKeys,\n          selectedKeys: selectedKeys,\n          showIcon: false,\n          treeData: getTreeData({\n            filters: column.filters\n          }),\n          autoExpandParent: true,\n          defaultExpandAll: true,\n          filterTreeNode: searchValue.trim() ? node => {\n            if (typeof filterSearch === 'function') {\n              return filterSearch(searchValue, getFilterData(node));\n            }\n            return searchValueMatched(searchValue, node.title);\n          } : undefined\n        })));\n      }\n      return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FilterSearch, {\n        filterSearch: filterSearch,\n        value: searchValue,\n        onChange: onSearch,\n        tablePrefixCls: tablePrefixCls,\n        locale: locale\n      }), /*#__PURE__*/React.createElement(Menu, {\n        selectable: true,\n        multiple: filterMultiple,\n        prefixCls: `${dropdownPrefixCls}-menu`,\n        className: dropdownMenuClass,\n        onSelect: onSelectKeys,\n        onDeselect: onSelectKeys,\n        selectedKeys: selectedKeys,\n        getPopupContainer: getPopupContainer,\n        openKeys: openKeys,\n        onOpenChange: onOpenChange,\n        items: renderFilterItems({\n          filters: column.filters || [],\n          filterSearch,\n          prefixCls,\n          filteredKeys: getFilteredKeysSync(),\n          filterMultiple,\n          searchValue\n        })\n      }));\n    };\n    const getResetDisabled = () => {\n      if (filterResetToDefaultFilteredValue) {\n        return isEqual((defaultFilteredValue || []).map(key => String(key)), selectedKeys, true);\n      }\n      return selectedKeys.length === 0;\n    };\n    dropdownContent = /*#__PURE__*/React.createElement(React.Fragment, null, getFilterComponent(), /*#__PURE__*/React.createElement(\"div\", {\n      className: `${prefixCls}-dropdown-btns`\n    }, /*#__PURE__*/React.createElement(Button, {\n      type: \"link\",\n      size: \"small\",\n      disabled: getResetDisabled(),\n      onClick: () => onReset()\n    }, locale.filterReset), /*#__PURE__*/React.createElement(Button, {\n      type: \"primary\",\n      size: \"small\",\n      onClick: onConfirm\n    }, locale.filterConfirm)));\n  }\n  // We should not block customize Menu with additional props\n  if (column.filterDropdown) {\n    dropdownContent = /*#__PURE__*/React.createElement(OverrideProvider, {\n      selectable: undefined\n    }, dropdownContent);\n  }\n  const menu = () => /*#__PURE__*/React.createElement(FilterDropdownMenuWrapper, {\n    className: `${prefixCls}-dropdown`\n  }, dropdownContent);\n  let filterIcon;\n  if (typeof column.filterIcon === 'function') {\n    filterIcon = column.filterIcon(filtered);\n  } else if (column.filterIcon) {\n    filterIcon = column.filterIcon;\n  } else {\n    filterIcon = /*#__PURE__*/React.createElement(FilterFilled, null);\n  }\n  const {\n    direction\n  } = React.useContext(ConfigContext);\n  return /*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-column`\n  }, /*#__PURE__*/React.createElement(\"span\", {\n    className: `${tablePrefixCls}-column-title`\n  }, children), /*#__PURE__*/React.createElement(Dropdown, {\n    dropdownRender: menu,\n    trigger: ['click'],\n    open: mergedVisible,\n    onOpenChange: onVisibleChange,\n    getPopupContainer: getPopupContainer,\n    placement: direction === 'rtl' ? 'bottomLeft' : 'bottomRight'\n  }, /*#__PURE__*/React.createElement(\"span\", {\n    role: \"button\",\n    tabIndex: -1,\n    className: classNames(`${prefixCls}-trigger`, {\n      active: filtered\n    }),\n    onClick: e => {\n      e.stopPropagation();\n    }\n  }, filterIcon)));\n}\nexport default FilterDropdown;","map":{"version":3,"names":["FilterFilled","classNames","isEqual","React","flattenKeys","Button","Checkbox","ConfigContext","Dropdown","Empty","Menu","OverrideProvider","Radio","Tree","useSyncState","FilterSearch","FilterDropdownMenuWrapper","warning","hasSubMenu","filters","some","_ref","children","searchValueMatched","searchValue","text","toString","toLowerCase","includes","trim","renderFilterItems","_ref2","prefixCls","filteredKeys","filterMultiple","filterSearch","map","filter","index","key","String","value","label","popupClassName","Component","item","undefined","createElement","Fragment","checked","FilterDropdown","props","_a","_b","tablePrefixCls","column","dropdownPrefixCls","columnKey","filterMode","filterState","triggerFilter","locale","getPopupContainer","filterDropdownOpen","onFilterDropdownOpenChange","filterResetToDefaultFilteredValue","defaultFilteredValue","filterDropdownVisible","onFilterDropdownVisibleChange","visible","setVisible","useState","filtered","length","forceFiltered","triggerVisible","newVisible","process","env","NODE_ENV","forEach","_ref3","deprecatedName","newName","prop","mergedVisible","propFilteredKeys","getFilteredKeysSync","setFilteredKeysSync","onSelectKeys","_ref4","selectedKeys","onCheck","keys","_ref5","node","useEffect","openKeys","setOpenKeys","onOpenChange","setSearchValue","onSearch","e","target","internalTriggerFilter","mergedKeys","onConfirm","onReset","confirm","closeDropdown","arguments","doFilter","onVisibleChange","filterDropdown","dropdownMenuClass","onCheckAll","allFilterKeys","getTreeData","_ref6","title","getFilterData","Object","assign","dropdownContent","setSelectedKeys","clearFilters","close","getFilterComponent","image","PRESENTED_IMAGE_SIMPLE","description","filterEmptyText","imageStyle","height","style","margin","padding","onChange","className","indeterminate","filterCheckall","checkable","selectable","blockNode","multiple","checkStrictly","checkedKeys","showIcon","treeData","autoExpandParent","defaultExpandAll","filterTreeNode","onSelect","onDeselect","items","getResetDisabled","type","size","disabled","onClick","filterReset","filterConfirm","menu","filterIcon","direction","useContext","dropdownRender","trigger","open","placement","role","tabIndex","active","stopPropagation"],"sources":["/data/messenger.client/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js"],"sourcesContent":["import FilterFilled from \"@ant-design/icons/es/icons/FilterFilled\";\nimport classNames from 'classnames';\nimport isEqual from \"rc-util/es/isEqual\";\nimport * as React from 'react';\nimport { flattenKeys } from '.';\nimport Button from '../../../button';\nimport Checkbox from '../../../checkbox';\nimport { ConfigContext } from '../../../config-provider/context';\nimport Dropdown from '../../../dropdown';\nimport Empty from '../../../empty';\nimport Menu from '../../../menu';\nimport { OverrideProvider } from '../../../menu/OverrideContext';\nimport Radio from '../../../radio';\nimport Tree from '../../../tree';\nimport useSyncState from '../../../_util/hooks/useSyncState';\nimport FilterSearch from './FilterSearch';\nimport FilterDropdownMenuWrapper from './FilterWrapper';\nimport warning from '../../../_util/warning';\nfunction hasSubMenu(filters) {\n  return filters.some(_ref => {\n    let {\n      children\n    } = _ref;\n    return children;\n  });\n}\nfunction searchValueMatched(searchValue, text) {\n  if (typeof text === 'string' || typeof text === 'number') {\n    return text === null || text === void 0 ? void 0 : text.toString().toLowerCase().includes(searchValue.trim().toLowerCase());\n  }\n  return false;\n}\nfunction renderFilterItems(_ref2) {\n  let {\n    filters,\n    prefixCls,\n    filteredKeys,\n    filterMultiple,\n    searchValue,\n    filterSearch\n  } = _ref2;\n  return filters.map((filter, index) => {\n    const key = String(filter.value);\n    if (filter.children) {\n      return {\n        key: key || index,\n        label: filter.text,\n        popupClassName: `${prefixCls}-dropdown-submenu`,\n        children: renderFilterItems({\n          filters: filter.children,\n          prefixCls,\n          filteredKeys,\n          filterMultiple,\n          searchValue,\n          filterSearch\n        })\n      };\n    }\n    const Component = filterMultiple ? Checkbox : Radio;\n    const item = {\n      key: filter.value !== undefined ? key : index,\n      label: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Component, {\n        checked: filteredKeys.includes(key)\n      }), /*#__PURE__*/React.createElement(\"span\", null, filter.text))\n    };\n    if (searchValue.trim()) {\n      if (typeof filterSearch === 'function') {\n        return filterSearch(searchValue, filter) ? item : null;\n      }\n      return searchValueMatched(searchValue, filter.text) ? item : null;\n    }\n    return item;\n  });\n}\nfunction FilterDropdown(props) {\n  var _a, _b;\n  const {\n    tablePrefixCls,\n    prefixCls,\n    column,\n    dropdownPrefixCls,\n    columnKey,\n    filterMultiple,\n    filterMode = 'menu',\n    filterSearch = false,\n    filterState,\n    triggerFilter,\n    locale,\n    children,\n    getPopupContainer\n  } = props;\n  const {\n    filterDropdownOpen,\n    onFilterDropdownOpenChange,\n    filterResetToDefaultFilteredValue,\n    defaultFilteredValue,\n    // Deprecated\n    filterDropdownVisible,\n    onFilterDropdownVisibleChange\n  } = column;\n  const [visible, setVisible] = React.useState(false);\n  const filtered = !!(filterState && (((_a = filterState.filteredKeys) === null || _a === void 0 ? void 0 : _a.length) || filterState.forceFiltered));\n  const triggerVisible = newVisible => {\n    setVisible(newVisible);\n    onFilterDropdownOpenChange === null || onFilterDropdownOpenChange === void 0 ? void 0 : onFilterDropdownOpenChange(newVisible);\n    onFilterDropdownVisibleChange === null || onFilterDropdownVisibleChange === void 0 ? void 0 : onFilterDropdownVisibleChange(newVisible);\n  };\n  if (process.env.NODE_ENV !== 'production') {\n    [['filterDropdownVisible', 'filterDropdownOpen', filterDropdownVisible], ['onFilterDropdownVisibleChange', 'onFilterDropdownOpenChange', onFilterDropdownVisibleChange]].forEach(_ref3 => {\n      let [deprecatedName, newName, prop] = _ref3;\n      process.env.NODE_ENV !== \"production\" ? warning(prop === undefined || prop === null, 'Table', `\\`${deprecatedName}\\` is deprecated. Please use \\`${newName}\\` instead.`) : void 0;\n    });\n  }\n  const mergedVisible = (_b = filterDropdownOpen !== null && filterDropdownOpen !== void 0 ? filterDropdownOpen : filterDropdownVisible) !== null && _b !== void 0 ? _b : visible;\n  // ===================== Select Keys =====================\n  const propFilteredKeys = filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys;\n  const [getFilteredKeysSync, setFilteredKeysSync] = useSyncState(propFilteredKeys || []);\n  const onSelectKeys = _ref4 => {\n    let {\n      selectedKeys\n    } = _ref4;\n    setFilteredKeysSync(selectedKeys);\n  };\n  const onCheck = (keys, _ref5) => {\n    let {\n      node,\n      checked\n    } = _ref5;\n    if (!filterMultiple) {\n      onSelectKeys({\n        selectedKeys: checked && node.key ? [node.key] : []\n      });\n    } else {\n      onSelectKeys({\n        selectedKeys: keys\n      });\n    }\n  };\n  React.useEffect(() => {\n    if (!visible) {\n      return;\n    }\n    onSelectKeys({\n      selectedKeys: propFilteredKeys || []\n    });\n  }, [propFilteredKeys]);\n  // ====================== Open Keys ======================\n  const [openKeys, setOpenKeys] = React.useState([]);\n  const onOpenChange = keys => {\n    setOpenKeys(keys);\n  };\n  // search in tree mode column filter\n  const [searchValue, setSearchValue] = React.useState('');\n  const onSearch = e => {\n    const {\n      value\n    } = e.target;\n    setSearchValue(value);\n  };\n  // clear search value after close filter dropdown\n  React.useEffect(() => {\n    if (!visible) {\n      setSearchValue('');\n    }\n  }, [visible]);\n  // ======================= Submit ========================\n  const internalTriggerFilter = keys => {\n    const mergedKeys = keys && keys.length ? keys : null;\n    if (mergedKeys === null && (!filterState || !filterState.filteredKeys)) {\n      return null;\n    }\n    if (isEqual(mergedKeys, filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys, true)) {\n      return null;\n    }\n    triggerFilter({\n      column,\n      key: columnKey,\n      filteredKeys: mergedKeys\n    });\n  };\n  const onConfirm = () => {\n    triggerVisible(false);\n    internalTriggerFilter(getFilteredKeysSync());\n  };\n  const onReset = function () {\n    let {\n      confirm,\n      closeDropdown\n    } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n      confirm: false,\n      closeDropdown: false\n    };\n    if (confirm) {\n      internalTriggerFilter([]);\n    }\n    if (closeDropdown) {\n      triggerVisible(false);\n    }\n    setSearchValue('');\n    if (filterResetToDefaultFilteredValue) {\n      setFilteredKeysSync((defaultFilteredValue || []).map(key => String(key)));\n    } else {\n      setFilteredKeysSync([]);\n    }\n  };\n  const doFilter = function () {\n    let {\n      closeDropdown\n    } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n      closeDropdown: true\n    };\n    if (closeDropdown) {\n      triggerVisible(false);\n    }\n    internalTriggerFilter(getFilteredKeysSync());\n  };\n  const onVisibleChange = newVisible => {\n    if (newVisible && propFilteredKeys !== undefined) {\n      // Sync filteredKeys on appear in controlled mode (propFilteredKeys !== undefiend)\n      setFilteredKeysSync(propFilteredKeys || []);\n    }\n    triggerVisible(newVisible);\n    // Default will filter when closed\n    if (!newVisible && !column.filterDropdown) {\n      onConfirm();\n    }\n  };\n  // ======================== Style ========================\n  const dropdownMenuClass = classNames({\n    [`${dropdownPrefixCls}-menu-without-submenu`]: !hasSubMenu(column.filters || [])\n  });\n  const onCheckAll = e => {\n    if (e.target.checked) {\n      const allFilterKeys = flattenKeys(column === null || column === void 0 ? void 0 : column.filters).map(key => String(key));\n      setFilteredKeysSync(allFilterKeys);\n    } else {\n      setFilteredKeysSync([]);\n    }\n  };\n  const getTreeData = _ref6 => {\n    let {\n      filters\n    } = _ref6;\n    return (filters || []).map((filter, index) => {\n      const key = String(filter.value);\n      const item = {\n        title: filter.text,\n        key: filter.value !== undefined ? key : index\n      };\n      if (filter.children) {\n        item.children = getTreeData({\n          filters: filter.children\n        });\n      }\n      return item;\n    });\n  };\n  const getFilterData = node => {\n    var _a;\n    return Object.assign(Object.assign({}, node), {\n      text: node.title,\n      value: node.key,\n      children: ((_a = node.children) === null || _a === void 0 ? void 0 : _a.map(item => getFilterData(item))) || []\n    });\n  };\n  let dropdownContent;\n  if (typeof column.filterDropdown === 'function') {\n    dropdownContent = column.filterDropdown({\n      prefixCls: `${dropdownPrefixCls}-custom`,\n      setSelectedKeys: selectedKeys => onSelectKeys({\n        selectedKeys\n      }),\n      selectedKeys: getFilteredKeysSync(),\n      confirm: doFilter,\n      clearFilters: onReset,\n      filters: column.filters,\n      visible: mergedVisible,\n      close: () => {\n        triggerVisible(false);\n      }\n    });\n  } else if (column.filterDropdown) {\n    dropdownContent = column.filterDropdown;\n  } else {\n    const selectedKeys = getFilteredKeysSync() || [];\n    const getFilterComponent = () => {\n      if ((column.filters || []).length === 0) {\n        return /*#__PURE__*/React.createElement(Empty, {\n          image: Empty.PRESENTED_IMAGE_SIMPLE,\n          description: locale.filterEmptyText,\n          imageStyle: {\n            height: 24\n          },\n          style: {\n            margin: 0,\n            padding: '16px 0'\n          }\n        });\n      }\n      if (filterMode === 'tree') {\n        return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FilterSearch, {\n          filterSearch: filterSearch,\n          value: searchValue,\n          onChange: onSearch,\n          tablePrefixCls: tablePrefixCls,\n          locale: locale\n        }), /*#__PURE__*/React.createElement(\"div\", {\n          className: `${tablePrefixCls}-filter-dropdown-tree`\n        }, filterMultiple ? /*#__PURE__*/React.createElement(Checkbox, {\n          checked: selectedKeys.length === flattenKeys(column.filters).length,\n          indeterminate: selectedKeys.length > 0 && selectedKeys.length < flattenKeys(column.filters).length,\n          className: `${tablePrefixCls}-filter-dropdown-checkall`,\n          onChange: onCheckAll\n        }, locale.filterCheckall) : null, /*#__PURE__*/React.createElement(Tree, {\n          checkable: true,\n          selectable: false,\n          blockNode: true,\n          multiple: filterMultiple,\n          checkStrictly: !filterMultiple,\n          className: `${dropdownPrefixCls}-menu`,\n          onCheck: onCheck,\n          checkedKeys: selectedKeys,\n          selectedKeys: selectedKeys,\n          showIcon: false,\n          treeData: getTreeData({\n            filters: column.filters\n          }),\n          autoExpandParent: true,\n          defaultExpandAll: true,\n          filterTreeNode: searchValue.trim() ? node => {\n            if (typeof filterSearch === 'function') {\n              return filterSearch(searchValue, getFilterData(node));\n            }\n            return searchValueMatched(searchValue, node.title);\n          } : undefined\n        })));\n      }\n      return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FilterSearch, {\n        filterSearch: filterSearch,\n        value: searchValue,\n        onChange: onSearch,\n        tablePrefixCls: tablePrefixCls,\n        locale: locale\n      }), /*#__PURE__*/React.createElement(Menu, {\n        selectable: true,\n        multiple: filterMultiple,\n        prefixCls: `${dropdownPrefixCls}-menu`,\n        className: dropdownMenuClass,\n        onSelect: onSelectKeys,\n        onDeselect: onSelectKeys,\n        selectedKeys: selectedKeys,\n        getPopupContainer: getPopupContainer,\n        openKeys: openKeys,\n        onOpenChange: onOpenChange,\n        items: renderFilterItems({\n          filters: column.filters || [],\n          filterSearch,\n          prefixCls,\n          filteredKeys: getFilteredKeysSync(),\n          filterMultiple,\n          searchValue\n        })\n      }));\n    };\n    const getResetDisabled = () => {\n      if (filterResetToDefaultFilteredValue) {\n        return isEqual((defaultFilteredValue || []).map(key => String(key)), selectedKeys, true);\n      }\n      return selectedKeys.length === 0;\n    };\n    dropdownContent = /*#__PURE__*/React.createElement(React.Fragment, null, getFilterComponent(), /*#__PURE__*/React.createElement(\"div\", {\n      className: `${prefixCls}-dropdown-btns`\n    }, /*#__PURE__*/React.createElement(Button, {\n      type: \"link\",\n      size: \"small\",\n      disabled: getResetDisabled(),\n      onClick: () => onReset()\n    }, locale.filterReset), /*#__PURE__*/React.createElement(Button, {\n      type: \"primary\",\n      size: \"small\",\n      onClick: onConfirm\n    }, locale.filterConfirm)));\n  }\n  // We should not block customize Menu with additional props\n  if (column.filterDropdown) {\n    dropdownContent = /*#__PURE__*/React.createElement(OverrideProvider, {\n      selectable: undefined\n    }, dropdownContent);\n  }\n  const menu = () => /*#__PURE__*/React.createElement(FilterDropdownMenuWrapper, {\n    className: `${prefixCls}-dropdown`\n  }, dropdownContent);\n  let filterIcon;\n  if (typeof column.filterIcon === 'function') {\n    filterIcon = column.filterIcon(filtered);\n  } else if (column.filterIcon) {\n    filterIcon = column.filterIcon;\n  } else {\n    filterIcon = /*#__PURE__*/React.createElement(FilterFilled, null);\n  }\n  const {\n    direction\n  } = React.useContext(ConfigContext);\n  return /*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-column`\n  }, /*#__PURE__*/React.createElement(\"span\", {\n    className: `${tablePrefixCls}-column-title`\n  }, children), /*#__PURE__*/React.createElement(Dropdown, {\n    dropdownRender: menu,\n    trigger: ['click'],\n    open: mergedVisible,\n    onOpenChange: onVisibleChange,\n    getPopupContainer: getPopupContainer,\n    placement: direction === 'rtl' ? 'bottomLeft' : 'bottomRight'\n  }, /*#__PURE__*/React.createElement(\"span\", {\n    role: \"button\",\n    tabIndex: -1,\n    className: classNames(`${prefixCls}-trigger`, {\n      active: filtered\n    }),\n    onClick: e => {\n      e.stopPropagation();\n    }\n  }, filterIcon)));\n}\nexport default FilterDropdown;"],"mappings":"AAAA,OAAOA,YAAY,MAAM,yCAAyC;AAClE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,WAAW,QAAQ,GAAG;AAC/B,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,SAASC,aAAa,QAAQ,kCAAkC;AAChE,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,OAAOC,KAAK,MAAM,gBAAgB;AAClC,OAAOC,IAAI,MAAM,eAAe;AAChC,SAASC,gBAAgB,QAAQ,+BAA+B;AAChE,OAAOC,KAAK,MAAM,gBAAgB;AAClC,OAAOC,IAAI,MAAM,eAAe;AAChC,OAAOC,YAAY,MAAM,mCAAmC;AAC5D,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,yBAAyB,MAAM,iBAAiB;AACvD,OAAOC,OAAO,MAAM,wBAAwB;AAC5C,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